#include <51func.h>
int main(int argc, char *argv[])
{
    int shmid = shmget(0x1234,4096,IPC_CREAT|0600);
    printf("shmid = %d\n", shmid);
    char * p = (char *)shmat(shmid,NULL,0);
    p[0] = 'H';
    p[1] = 'e';
    p[2] = 'l';
    p[3] = 'l';
    p[4] = 'o';
    sleep(30);
    printf("sleep over!\n");
    shmdt(p);
    return 0;
}

